﻿using System;
using System.Data;

namespace Shopping.Entities
{
    /// -----------------------------------------------------------------------------
    ///<summary>
    /// The Info class for the PromotionsInfo
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    public class PromotionsInfo
    {
        #region Private Members
		
        private string _alia="";
        private string _title="";
        private string _description="";
        private double _promotionPercent;
        private DateTime _startDate;
        private DateTime _endDate;
        private DateTime _createDate;
        private string _createBy="";
        private int _id;
        #endregion
        #region Constructors
        // initialization

        #endregion
        #region Public Properties
        /// <summary>
        /// Get and Set Property Data of File column Alias in Table Promotions 
        /// </summary>
				
        public string Alia
        {
            get{ return _alia; }
            set{ _alia = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column Title in Table Promotions 
        /// </summary>
				
        public string Title
        {
            get{ return _title; }
            set{ _title = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column Description in Table Promotions 
        /// </summary>
				
        public string Description
        {
            get{ return _description; }
            set{ _description = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column PromotionPercent in Table Promotions 
        /// </summary>
				
        public double PromotionPercent
        {
            get{ return _promotionPercent; }
            set{ _promotionPercent = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column StartDate in Table Promotions 
        /// </summary>
				
        public DateTime StartDate
        {
            get{ return _startDate; }
            set{ _startDate = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column EndDate in Table Promotions 
        /// </summary>
				
        public DateTime EndDate
        {
            get{ return _endDate; }
            set{ _endDate = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column CreateDate in Table Promotions 
        /// </summary>
				
        public DateTime CreateDate
        {
            get{ return _createDate; }
            set{ _createDate = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column CreateBy in Table Promotions 
        /// </summary>
				
        public string CreateBy
        {
            get{ return _createBy; }
            set{ _createBy = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column Id in Table Promotions 
        /// </summary>
				
        public int Id
        {
            get{ return _id; }
            set{ _id = value; }
        }
				
        #endregion		
		
        #region IHydratable Implementation

        /// <summary>
        /// 
        /// </summary>        
        public void Fill(IDataReader oReader)
        {
            _alia=Convert.ToString(oReader["Alia"]);
            _title=Convert.ToString(oReader["Title"]);
            _description=Convert.ToString(oReader["Description"]);
            _promotionPercent=double.Parse(oReader["PromotionPercent"].ToString());
            _startDate=DateTime.Parse(oReader["StartDate"].ToString());
            _endDate=DateTime.Parse(oReader["EndDate"].ToString());
            _createDate=DateTime.Parse(oReader["CreateDate"].ToString());
            _createBy=Convert.ToString(oReader["CreateBy"]);
            _id=int.Parse(oReader["Id"].ToString());
        }
        #endregion
    }
}